<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>供应商注册</title>
<link href="./css/common.css" rel="stylesheet" />
<link href="./css/common-head-footer.css" rel="stylesheet" />
<link href="./css/reg.css" rel="stylesheet" />
<script type="text/javascript" src="./js/util.js"></script>
<script type="text/javascript">
function switichAdvance(obj){
	var advanceInfo=$("advance-info");
	if(obj.checked)
		advanceInfo.style.display="block";
	else
		advanceInfo.style.display="none";
			
}
function validate_form(frm){
	if(frm['unitName'].value.trim().length<1){
		alert("单位名称是必须的");
		$focus(frm['unitName']);
		return false;
	}
	if(frm['username'].value.trim().length<1){
		alert("帐号是必须的");
		$focus(frm['username']);
		return false;
	}
	if(frm['password'].value.trim().length<1){
		alert("密码是必须的");
		$focus(frm['password']);
		return false;
	}
	if(frm['repassword'].value.trim().length<1){
		alert("重复密码是必须的");
		$focus(frm['repassword']);
		return false;
	}
	if(frm['repassword'].value != frm['password'].value){
		alert("两次密码不一致 ！");
		frm['password'].value="";
		frm['repassword'].value="";
		$focus(frm['password']);
		return false;
	}
	if(frm['checkcode'].value.trim().length<1){
		alert("机器码是必须的");
		$focus(frm['checkcode']);
		return false;
	}
	return true;
}
</script>
</head>
<body>
<jsp:include page="./sub-blocks/header-block.jsp"></jsp:include>
<form method="post" action="#" onsubmit="return validate_form(this)">
<div class="login-panel">
	<div class="reg-title"><img src="./images/provider-icon-reg.png"/></div>
	<div class="basic-info">
		<ul class="list-item">
			<li><div class="label">单位名称：</div><div class="content"><input type="text" name="unitName" size="70" /></div></li>
			<li><div class="label">帐号：</div><div class="content"><input type="text" name="username"  /><a href="javascript:void(0)" onclick="alert('帐号检测')">检测帐号</a></div></li>
			<li><div class="label">密码：</div><div class="content"><input type="password" name="password"  /></div></li>
			<li><div class="label">重复密码：</div><div class="content"><input type="password" name="repassword" /></div></li>
			<li><div class="label">机器码：</div><div class="content"><input type="text" size="5" name="checkcode" /><img src="./images/checkcode.png" alt="" align="absmiddle" /></div></li>
		</ul>
	</div>
	<div class="extends-info-tip"><input type="checkbox" id="advance-checkbox" onclick="switichAdvance(this)" /><label for="advance-checkbox">填写扩展信息</label></div>
	<div class="advance-info" id="advance-info">
		<ul class="list-item">
			<li><div class="label">地址：</div><div class="content"><input type="text" name="address"  size="70" /></div></li>
			<li><div class="label">电话：</div><div class="content"><input type="text" name="phone"  /></div></li>
			<li><div class="label">联系人：</div><div class="content"><input type="text" name="conPerson" /></div></li>
			<li><div class="label">传真：</div><div class="content"><input type="text" name="fax" /></div></li>
			<li><div class="label">邮编：</div><div class="content"><input type="text" name="postcode" /></div></li>
			<li><div class="label">备注：</div><div class="content"><textarea cols="70" name="remark" rows="5"></textarea></div></li>
		</ul>
	</div>
</div>
<div class="submit-panel">
	<input type="submit" value="" class="ok" />
	<input type="button" value="" class="cancel" />
</div>
</form>
<jsp:include page="./sub-blocks/footer-block.jsp"></jsp:include>
</body>
</html>